package com.sg.dto.integration.framework;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

/**
 * @desc DeptAdminAndDeputyDto
 * @使用场景
 */
@Data
public class DeptAdminAndDeputyDto extends BaseDto implements Serializable {

    /**
     * 个人账号ID
     */
    @ApiModelProperty("个人账号ID")
    private String userId;

    /**
     * 身份人员ID
     */
    @ApiModelProperty("身份人员ID")
    private String originalRoleMemberId;

    /**
     * 真实头像
     */
    @ApiModelProperty("真实头像")
    private String userFace;

    /**
     * 真实姓名
     */
    @ApiModelProperty("真实姓名")
    private String idCardName;

    /**
     * 绑定手机
     */
    @ApiModelProperty("绑定手机")
    private String phone;

    /**
     * 身份角色编码
     */
    @ApiModelProperty("身份角色编码")
    private String roleCode;

    /**
     * 身份人员编号
     */
    @ApiModelProperty("身份人员编号")
    private String roleMemberCode;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        DeptAdminAndDeputyDto that = (DeptAdminAndDeputyDto) o;
        return (
                userId == that.userId &&
                        originalRoleMemberId == that.originalRoleMemberId &&
                        userFace == that.userFace &&
                        idCardName == that.idCardName &&
                        phone == that.phone &&
                        roleCode == that.roleCode &&
                        roleMemberCode == that.roleMemberCode
        );
    }

    @Override
    public int hashCode() {
        return Objects.hash(
                super.hashCode(),
                userId,
                originalRoleMemberId,
                userFace,
                idCardName,
                phone,
                roleCode,
                roleMemberCode
        );
    }

}
